package com.ohxwj.modules.web.service.impl;

import com.ohxwj.modules.web.dao.WebBannerDao;
import com.ohxwj.modules.web.entity.WebBannerEntity;
import com.ohxwj.modules.web.service.WebBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018-04-09.
 */
@Service
public class WebBannerServiceImpl implements WebBannerService {

    @Autowired
    private WebBannerDao webBannerDao;

    @Override
    public void insertWebBanner(WebBannerEntity webBannerEntity) {
        webBannerDao.save(webBannerEntity);
    }

    @Override
    public List<WebBannerEntity> queryBanners() {
        return webBannerDao.queryList(null);
    }

    @Override
    public int updateWebBanner(WebBannerEntity webBannerEntity) {
        return webBannerDao.update(webBannerEntity);
    }

    @Override
    public int deleteWebBanner(int id) {
        return webBannerDao.delete(id);
    }
}
